home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / nihcl-30.lha / nihcl-3.0 / lib / IdentDict.h < prev    next >
C/C++ Source or Header  |  1990-05-19  |  2KB  |  54 lines

  1. #ifndef    IDENTDICT_H
  2. #define    IDENTDICT_H
  3.  
  4. /*$Header: /afs/alw.nih.gov/unix/sun4_40c/usr/local/src/nihcl-3.0/share/lib/RCS/IdentDict.h,v 3.0 90/05/20 00:19:49 kgorlen Rel $*/
  5.  
  6. /* IdentDict.h -- declarations for Identity Dictionary
  7.  
  8.     THIS SOFTWARE FITS THE DESCRIPTION IN THE U.S. COPYRIGHT ACT OF A
  9.     "UNITED STATES GOVERNMENT WORK".  IT WAS WRITTEN AS A PART OF THE
  10.     AUTHOR'S OFFICIAL DUTIES AS A GOVERNMENT EMPLOYEE.  THIS MEANS IT
  11.     CANNOT BE COPYRIGHTED.  THIS SOFTWARE IS FREELY AVAILABLE TO THE
  12.     PUBLIC FOR USE WITHOUT A COPYRIGHT NOTICE, AND THERE ARE NO
  13.     RESTRICTIONS ON ITS USE, NOW OR SUBSEQUENTLY.
  14.  
  15. Author:
  16.     K. E. Gorlen
  17.     Computer Systems Laboratory, DCRT
  18.     National Institutes of Health
  19.     Bethesda, MD 20892
  20.  
  21. $Log:    IdentDict.h,v $
  22.  * Revision 3.0  90/05/20  00:19:49  kgorlen
  23.  * Release for 1st edition.
  24.  * 
  25. */
  26.  
  27. #include "Dictionary.h"
  28.  
  29. class LookupKey;
  30.  
  31. class IdentDict: public Dictionary {
  32.     DECLARE_MEMBERS(IdentDict);
  33.     virtual int findIndexOf(const Object&) const;
  34. #ifndef BUG_38
  35. // internal <<AT&T C++ Translator 2.00 06/30/89>> error: bus error (or something nasty like that)
  36. protected:        // storer() functions for object I/O
  37.     virtual    void storer(OIOofd& fd)    const    { Dictionary::storer(fd); };
  38.     virtual    void storer(OIOout& strm) const    { Dictionary::storer(strm); };
  39. #endif
  40. public:
  41.     IdentDict(unsigned size =DEFAULT_CAPACITY);
  42. #ifndef BUG_TOOBIG
  43. // yacc stack overflow
  44.     IdentDict(const IdentDict&);
  45. #endif
  46.     void operator=(const IdentDict&);
  47.     virtual LookupKey* assocAt(const Object& key) const;
  48.     virtual Object* atKey(const Object& key) const;
  49.     virtual Object* atKey(const Object& key, Object& newValue);
  50.     virtual bool includesKey(const Object& key) const;
  51. };
  52.  
  53. #endif
  54.